package dse;

import java.util.Collection;

/**
 * General abstract class for networks.  Note that even in the non-Mixed
 * Algorithm clusters may be created.  These will not be used in the experiment,
 * but may allow us to better compare the results with the Mixed algorithm.
 *  
 * @author Sam
 */
public abstract class Network {
	/**
	 * Finds and returns the node with the given id.
	 * 
	 * @param id
	 * @return
	 */
	public abstract Node lookupNode (int id);
	/**
	 * Go through all nodes in the network.
	 * @return
	 */
	public abstract Collection<Node> nodes ();
	/**
	 * Returns the number of nodes in the network.
	 * @return
	 */
	public abstract int nodeCount ();
	/**
	 * Gets the maximum id of all nodes in the network.  This is useful for 
	 * hashing.
	 * @return
	 */
	public abstract int maxNodeId ();
	/**
	 * Finds and returns the cluster with the given id.
	 * 
	 * @param id
	 * @return
	 */
	public abstract Cluster lookupCluster (int id);
	/**
	 * Go through all clusters in the network.
	 * @return
	 */
	public abstract Iterable<Cluster> clusters ();
	/**
	 * Whether or not the network has clusters.
	 * @return
	 */
	public abstract boolean hasClusters ();
	/**
	 * Returns the number of clusters in the network.
	 * @return
	 */
	public abstract int clusterCount ();
	/**
	 * Gets the maximum id of all clusters in the network.  This is useful for 
	 * hashing.
	 * @return
	 */
	public abstract int maxClusterId ();
}
